home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / comm / term / vltj5867.lha / VLT / rexx / VLTPhoneDelete.rexx < prev    next >
OS/2 REXX Batch file  |  1994-03-27  |  1KB  |  55 lines

  1. /** VLTPhoneDelete.rexx
  2. *
  3. *   Select the entries to be deleted.
  4. *
  5. *   By W.G.J. Langeveld, February 1992.
  6. *
  7. **/
  8. if show("l", "rexxarplib.library") = 0 then do
  9.    check = addlib('rexxsupport.library', 0, -30, 0)
  10.    check = addlib('rexxarplib.library',  0, -30, 0)
  11. end
  12. /*
  13. *   Get VLT port and screen names and size
  14. */
  15. vltport = address()
  16. cols = ScreenCols(vltport)
  17. if cols == -1 then do
  18.    vltscreen = ""
  19.    cols = ScreenCols()
  20.    rows = ScreenRows()
  21. end
  22. else do
  23.    vltscreen = vltport
  24.    rows = ScreenRows(vltscreen)
  25. end
  26. /*
  27. *   Check if we're set up right
  28. */
  29. call pragma('W','NULL')
  30.  
  31. if ~exists("VLTPhoneBook:") then do
  32.    "@VLTPhoneSetup.rexx"
  33.    exit
  34. end
  35. /*
  36. *   Use a multiple select file requester. This works only under 2.0
  37. */
  38. test = GetFile(80, 50, "VLTPhoneBook:",, "Select Entries to Delete",  ,
  39.                vltscreen, "MULTISELECT", files)
  40. if test = "" then exit
  41.  
  42. if files.0 = 0 then exit
  43. /*
  44. *   Delete the entries.
  45. */
  46. test = Request(80, 50, "This operation will delete "files.0" entries",,   ,
  47.                " Delete Them ", " No! Stop! ", vltscreen)
  48. if test == "" then exit
  49.  
  50. do i = 1 to files.0
  51.    address COMMAND "delete >nil: "files.i
  52. end
  53.  
  54. exit
  55.